import React, { Component } from 'react';

import { Route, Link } from 'react-router-dom';

import Books from './Book'
import Videos from './Video'

class Layout extends Component {
    render() {
        return (
            <>
                <ul id='left'>
                    <li><Link to='/book'>书籍</Link></li>
                    <li><Link to='/video'>视频</Link></li>
                </ul>
                <div id='content'>
                    <Route path='/book' component={Books}></Route>
                    <Route path='/video' component={Videos}></Route>
                </div>
            </>
        );
    }
}

export default Layout;